<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="master.html" />

<title>Clusters</title>
<head>
<meta http-equiv="refresh" content="5" /> 

<script type = "text/javascript" src="/javascript/sortable_tables.js"></script>
<script type = "text/javascript" src="/javascript/ibox.js"></script>
<!--ibox must go after sortable_tables to keep popup windows (possible method overwrite)-->

</head>

<!--see roles2.html for documentation about how tables are made-->

<body>

<!--<h2><a href = "/roles2">Roles</a>  <a href = "/vms2">VMs</a>  Clusters</h2>-->

<div style="overflow:auto; width:800px; height: 600px;">
<table border = "1" id="sortable_table" class="datagrid">
    <thead>
      <tr>
          <th style="cursor:pointer">name</th>
	  <th style="cursor:pointer">currentSC</th>
	  <th style="cursor:pointer">targetSC</th>
	  <th style="cursor:pointer">attr</th>
	  <th style="cursor:pointer">roles</th>
      </tr>
    </thead> 
    <tbody>
      <div py:for="i in range(0, len(clusters))">
        <tr>
	    <td>
	      ${clusters[i].getAttr("name")}</td>
	    <td bgcolor="${SC_colors[clusters[i].currentSC % len(SC_colors)]}">
	      <font color = "black">
	      ${SC_table[clusters[i].currentSC]}</font></td>
	    <td bgcolor="${SC_colors[clusters[i].targetSC % len(SC_colors)]}">
	      <font color = "black">
	      ${SC_table[clusters[i].targetSC]}</font></td>
	    <td>     
	      <a href = "${'/dispcl/'+clusters[i].getAttr('name')+'/attr'}" rel = "ibox">Show Attr</a></td>
	    <td>
	      <a href = "${'/dispcl/'+clusters[i].getAttr('name')+'/roles'}" rel = "ibox">Show Roles</a></td>
	</tr>
      </div>
    </tbody>
</table>
</div>

</body>

</html>